/*
 * replaceAll()完成类似于java中的replaceAll()功能，利用正则表达式进行替换
 * @param s1
 *           正则表达式
 * @param s2
 *            替换
 * @return String
 * */
String.prototype.replaceAll = function(s1, s2) {
	return this.replace(new RegExp(s1, "gm"), s2);
}

/*
 * clean()完成对这个String内容的过滤，过滤其中的HTML标签 @return String
 */
String.prototype.clean = function() {
	var string = this;
	string = string.replaceAll("<", "&lt;");
	string = string.replaceAll(">", "&gt;");
	return string;
}

/*
 * 用于检测是否存在某个字符串
 */
String.prototype.contain=function(str) {
	var string = this;
	if(string.indexOf(str) >= 0 )  
	{  
		return true;
	}  
	return false;
}

/**
 * 不和谐内容
 */
var sensitiveWords=["窃听","骚穴","淫水","淫女","迷昏药","迷魂药","老虎机","赌博机","麻醉药","安眠药","抢劫药","麻服散","化骨水","麻醉","迷幻药","成人激情","三唑仑","摇头丸","Ｋ粉","监听器","共产党","维派","办证","发票","江泽民","胡锦涛","法轮","falun","六四","民运","唐人","大法","李洪志","六合彩","六合采","九评","退党","明慧","大纪元","天安门","自由亚州","无界","美国之音","口交","性虐待","手枪","枪支","文凭","针孔","监听","色友","喷尿","A片","小穴","精液","幼交","兽交","肛交","集会","静坐","罢工","马红林","马宏林","上访","进京","骚乱","戒严","期刊","职称","文凭","代考","招聘","低价","出售","抗议","示威","人权","抗暴","中共","镇压","打倒","绝食","维权","先烈","政协","反抗","压迫","本店","营销","户口","户籍","城乡","宰割","团结","斗争","因为一个软件","相处五年的男友","开心OL","百家乐","捕音王","透视扑克","透视麻将","国家级省级正规期刊","发表各类职称","正规期刊征集","诚聘网络兼职","杂志社征搞启事","地磅遥控器","地磅解码器","江姐来电问","董存瑞问","吴琼花问","马克思问","刘胡兰问","正规期刊联合征稿","鉴别铁观音","铁观音产地茶","温云松","张蓓莉","出售蒙汉药","铁观音产地","西安小手帕","西安三资职业学院","北方汽车专修学校","北方汽修","出售海关罚没","体检枪手","代理全国各地体检","理證件","海关罚没","特级代理","支付宝电话","宝人工客服","发票代开","税务代开","北亚","宫颈糜烂","代办信用卡","全球最大的华人视聊","发票","激情视频聊天室","皇爵娱乐","主机租用","路桥英才网","伟哥","万艾可","师各类证书办理","招聘在家发帖赚钱","快速办理大学毕业证","迥理亦","真钱斗地主","真钱娱乐","自助建站系统","免费申请网站","终端","超强挂机类网赚","幼幼帝国","嬉点军校","救囯集中淫","品色堂","救国P2P","代人发帖","出售港行货手机","替考QQ","辦英语","太阳城网上娱乐","充氣","辦假","假證","手机通话清单查询","手机短信内容查询","借助MD5函数","毕 业 证","文 凭","本 公 司","长 期 办 理","刻 章","发零售全新原装","快运","窃.听.器","工作","办国外学历","理国外学历","国外文凭样本","聘兼职网络","机破解技术","机破解方法","信用卡套现","招聘打字员","可在家在校工作兼职","文凭快速办理","资格证书办理","免担保无抵押","成人用品商城"];

/**
 * containSensitiveWords用于检查字符串中是否存在不和谐的内容
 */
String.prototype.containSensitiveWords=function(){
	for(var i=0;i<sensitiveWords.length;i++){
		var string=this;
		if(string.contain(sensitiveWords[i])){
			alert("对不起，你的输入中含有\""+sensitiveWords[i]+"\"，不能发表。\n这个你懂的！");
			return true;
		}
	}
	return false;
}

